<template>
  <view class="container screen-width">
    <view class="search-input flex items-middle">
      <input v-model="params.productName" type="text" placeholder="请输入商品名称" />
      <view class="search-btn" @click="getList(1)">搜索</view>
    </view>
    <scroll-view class="list" :scroll-y="true" @scrolltolower="scrolltolower()">
      <view
        v-for="(item, index) in list"
        :key="item.id"
        class="company-content flex items-middle space-between"
      >
        <view class="item flex items-middle" @click="toDetail(item.id)">
          <view class="img-box flex-center flex items-middle">
            <image mode="widthFix" :src="getImageUrl(item.productImage)" />
            <!-- <view v-else class="text">暂无图片</view> -->
          </view>

          <view class="info">
            <view class="title">{{ item.productName }}</view>
            <view class="date">
              <text>￥</text>
              {{ item.productPrice || '--' }}
            </view>
          </view>
        </view>
      </view>
      <van-divider v-if="list.length && total < list.length + 1" content-position="center">我也是有底线的</van-divider>
    </scroll-view>
    <Festival></Festival>
  </view>
</template>
<script src="./index.js"></script>
<style lang="less" scoped src="./index.less"></style>
